package com.gaomall.seckill.exception;

import com.gaomall.seckill.enums.ResponseStatusCode;
import lombok.Getter;

@Getter
public class GoodsException extends RuntimeException{

    private Integer code;

    public GoodsException(ResponseStatusCode responseStatusCode){
        super(responseStatusCode.getReturn_msg());
        this.code = responseStatusCode.getReturn_code();

    }

    public GoodsException(Integer code, String msg){
        super(msg);
        this.code = code;

    }
}
